import React, { Component } from 'react';
import { StyleSheet, Text, View } from 'react-native';

export default class index extends Component {
    render() {
        return (
            <View>
                <Text style={{ fontSize: 20 }}> textInComponent </Text>
                <Text style={[{ fontSize: 30 }, { color: 'red' }]}> textInComponent </Text>

                <Text style={styles.h1}> textInComponent </Text>
                <Text style={styles.h2}> textInComponent </Text>
            </View>
        );
    }
}

const styles = StyleSheet.create({
    h1: {
        fontSize: 40,
        fontWeight: 'bold',
    },
    h2: {
        fontSize: 30,
        fontWeight: 'bold',
    },
});
